import mockApiFun from './mockApis/mockApiFun'
import {
    host as hostPaymentApplicationForm,
    successCode as successCodePaymentApplicationForm,
    notNeedMessageTip as notNeedMessageTipPaymentApplicationForm,
    mockApiData as mockApiDataPaymentApplicationForm,
} from './mockApis/paymentApplicationFormApiMock'
import {
    host as hostCentralizedPayment,
    successCode as successCodeCentralizedPayment,
    notNeedMessageTip as notNeedMessageTipCentralizedPayment,
    mockApiData as mockApiDataCentralizedPayment,
} from './mockApis/centralizedPaymentApiMock'

import {
    mockApiData as mockApiDataDemo
} from './mockApis/demoApiMock'

function activeMock() {
    const Mock = require('mockjs');

    mockApiFun({
        Mock,
        host: hostPaymentApplicationForm,
        successCode: successCodePaymentApplicationForm,
        notNeedMessageTip: notNeedMessageTipPaymentApplicationForm,
        mockApiData: mockApiDataPaymentApplicationForm
    })
    mockApiFun({
        Mock,
        host: hostCentralizedPayment,
        successCode: successCodeCentralizedPayment,
        notNeedMessageTip: notNeedMessageTipCentralizedPayment,
        mockApiData: mockApiDataCentralizedPayment
    })
    mockApiFun({
        Mock,
        mockApiData: mockApiDataDemo,
    })
    Mock.setup({
        timeout: 1000,
    })
}

export default activeMock;